<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <span th:if="${age>=18}">成年了</span>
    <span th:unless="${age>=18}">未成年</span>

    <div th:switch="${sex}">
        <span th:case="男">男</span>
        <span th:case="女">女</span>
        <span th:case="*">未知</span>
    </div>
</body>
</html>